﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<List<Pulog.Models.Post>>" %>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%= Html.Encode(ViewData["Message"]) %></h2>
    <% List<Pulog.Models.User> users = (List<Pulog.Models.User>)ViewData["User"]; %>
    <% int i = 0; foreach (var post in ViewData.Model)
       {
          %>
          <%--<li><a href="<%= Url.Action("Show","Post",new{ slug=post.slug}) %>" title="<%=post.title %>"><%=post.title %></a></li>--%>
          <li><%= Html.ActionLink(post.title, "ShowPost", new { slug = post.slug })%> <%=users[i].userName %><% i++; %> 发表于 <%=post.pubTime %></li>
          <p><%=post.content %></p>
      <%}%>
</asp:Content>
